package com.qigao.mall.jdbc.mapper;

import com.qigao.mall.commons.dto.PromGroupCondDto;
import com.qigao.mall.jdbc.model.PromGroup;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Copyright (C), 2020-2020
 * FileName: PromGroupMapper
 * Author:   luiz
 * Date:     2020/10/15 14:38
 * Description: 团购Mapper
 */
public interface PromGroupMapper extends AbstractPromGroupMapper{

    PromGroup selectOneByIndex(@Param("itemNo") String itemNo, @Param("leaderUser")String leaderUser);

    List<PromGroup> selectByItemNo(String itemNo);

    PromGroup selectByGroupNo(@Param("groupNo") String groupNo);

    int addActNum(PromGroup promGroup);

    List<PromGroup> selectOpenGroup();

    void processPromGroup(List<PromGroup> promGroups);

    void closePromGroup(List<PromGroup> promGroups);


    List<PromGroup> selectUnSettle();

    List<PromGroup> selectByCond(PromGroupCondDto promGroupCondDto);

    List<PromGroup> selectByOrderNos(List<String> orderNos);

    List<PromGroup> selectValidByItemNo(String itemNo);

    List<PromGroup> selectUnRefund();

    List<PromGroup> selectOverTime();

    PromGroup selectByOrderNo(String orderNo);
}
